<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SushiTV - Log in</title>
<meta name="keywords" content="anime watch, anime series, anime videos, watch anime online, mad, amv, mmd, otomad">
<meta name="description" content="Watch anime series online for free, upload original anime videos and share it with anime fans at SushiTV!">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@SushiTV_">
<meta name="twitter:title" content="SushiTV - Watch Anime for Free and Share Anime Videos for Love">
<meta name="twitter:image" content="https://sushi.tv/media/images/logo.png?v=20160928094441"/> <meta property="og:type" content="article"/>
<meta property="og:title" content="SushiTV - Watch Anime for Free and Share Anime Videos for Love"/>
<meta property="og:site_name" content="Sushi TV"/>
<meta property="og:description" content="Watch anime series online for free, upload original anime videos and share it with anime fans at SushiTV!"/>
<meta property="og:image" content="https://sushi.tv/media/images/logo_share.jpg?v=20160928094441"/>
<meta property="og:image:width" content="400"/>
<meta property="og:image:height" content="400"/>
<meta property="og:url" content="/login"/>
<meta property="fb:app_id" content="612154455625981"/>
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,700,800' rel='stylesheet' type='text/css'>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="//s.sushi.tv/media/css/base.css?v=20160928094441">
<link rel="stylesheet" href="//s.sushi.tv/media/css/style.css?v=20160928094441">
<link rel="stylesheet" href="//s.sushi.tv/media/css/login.css?v=20160928094441">
<link rel="shortcut icon" href="//s.sushi.tv/media/images/favicon.ico?v=20160928094441">
<!--[if lt IE 9]><script src="//s.sushi.tv/media/js/html5.js?v=20160928094441"></script><![endif]-->
<script src="//s.sushi.tv/media/js/jquery.js?v=20160928094441"></script>
<script>
        var fb_appId = 612154455625981;
        var passportHost = 'https://passport.sushi.tv';
        var frontendHost = 'http://sushi.tv';
    </script>
<meta name="csrf-param" content="_csrf">
<meta name="csrf-token" content="VHFYdmROT1E9Eh84Hi81ZTVGDxoAYxUzYEQsBFELPhI1RikhPnoLZA==">
</head>
<body>
<div class="bl-login">
<div class="bl-logo">
<a href="http://sushi.tv" class="hide-text">Sushi</a>
</div>
<div class="login-col">
<div class="reg-inner fn-clearfix">
<div id="Login_tab" class="bl-login-form">
<span class="signlink"><a href="/signup">Sign Up</a></span>
<ul class="etabs fn-clearfix">
<li class="tab"><a href="#log-email">Email</a></li>
<li class="tab"><a href="#log-phone">Phone</a></li>
</ul>
 
<div id="log-email">
<form class="bl-form" method="post" id="loginForm">
<div class="input-group">
<span class="input-addon"><i class="fa fa-envelope fa-lg"></i></span>
<input type="text" class="form-control" placeholder="Email" name="email">
<span id="userNamespt" class="normaltips"></span>
</div>
<div class="input-group">
<span class="input-addon"><i class="fa fa-lock fa-lg"></i></span>
<input type="password" class="form-control" placeholder="Password" name="password" onkeyup="enterSub(event)">
<span id="userNamespt" class="normaltips"></span>
</div>
<div class="others"><a href="/forgot">Forgot your password?</a></div>
<div class="input-group">
<input type="checkbox" id="checkout" value="1" checked="1" class="labelcheckbox" name="rememberMe">
<label for="checkout" class="label">Keep me logged in</label>
</div>
<div class="input-group">
<button type="button" class="btn-signin" onclick="checkForm()">LOG IN</button>
<a class="fb-log login-fb" href="javascript:;">LOG IN WITH FACEBOOK</a>
</div>
<input type="hidden" name="_csrf" value="VHFYdmROT1E9Eh84Hi81ZTVGDxoAYxUzYEQsBFELPhI1RikhPnoLZA==">
<input type="hidden" name="r" value="http://sushi.tv/">
</form>
</div>
<div id="log-phone">
<form class="bl-form" method="post" id="phoneForm">
<div class="form-group fn-clearfix">
<div class="control-col" style="width:100%">
<div class="num-col">
<input type="text" class="form-control" placeholder="" id="phone" name="phone" style="width:458px">
<span id="userphone" class="normaltips"></span>
</div>
</div>
</div>
<div class="input-group">
<span class="input-addon"><i class="fa fa-lock fa-lg"></i></span>
<input type="password" class="form-control" placeholder="Password" name="password" onkeyup="enterSub(event)">
<span id="userNamespt" class="normaltips"></span>
</div>
<div class="others"><a href="/forgot">Forgot your password?</a></div>
<div class="input-group">
<input type="checkbox" id="checkout" value="1" checked="1" class="labelcheckbox" name="rememberMe">
<label for="checkout" class="label">Keep me logged in</label>
</div>
<div class="input-group">
<button type="button" class="btn-signin" id="phone-submit">LOG IN</button>
<a class="fb-log login-fb" href="javascript:;">LOG IN WITH FACEBOOK</a>
</div>
<input type="hidden" name="_csrf" value="VHFYdmROT1E9Eh84Hi81ZTVGDxoAYxUzYEQsBFELPhI1RikhPnoLZA==">
<input type="hidden" name="r" value="http://sushi.tv/">
</form>
</div>
</div>
</div>
</div>
<div class="landing-tip">
<p>
Hello, are you ready to make contact with Sushi.tv? Well it’s not that easy to become a Mahou shoujo….just kidding, become a member of Sushi.tv. Here is a test for you! Test takers who answer 60% or more of the test questions correctly will get the invitation code. (Don’t worry if you failed, you could try it again.)
</p>
</div>
<script src="//s.sushi.tv/media/js/intlTelInput.js?v=20160928094441"></script>
<script src="//s.sushi.tv/media/js/validate.js?v=20160928094441"></script>
<script src="//s.sushi.tv/media/js/validate_messages.js?v=20160928094441"></script>
<script src="//s.sushi.tv/media/js/jquery.easytabs.min.js?v=20160928094441"></script>
<script>
	$("#Login_tab").easytabs({ updateHash: false});
	var hash = window.location.hash;
    if(hash) {
        $(hash).addClass('in');
    }
	$("#phone").intlTelInput();
            $("#phone").intlTelInput('selectCountry', 'us');
        var i=0;
    function enterSub(e) {
        var code = window.event ? e.keyCode : e.which
        if(code == 13) {
            checkForm();
        }
    }
    var flag = true;
    function checkForm() {
        if($('#loginForm').valid()) {
            if(flag) {
                flag = false;
                $.post('/login', $('#loginForm').serialize(), function(r){
                    if(r == 1) {
                        var r = $('input[name="r"]').val();
                        if(r) {
                            location.href = r;
                        } else {
                            location.href = 'http://sushi.tv';
                        }
                    } else {
                        i++;
                        if(i >= 3) {
                            if(!$('#loginForm .dca').size()) {
                                html = '<div class="form-group dca">'
                                +'<input type="text" class="form-control captchaInput" name="captcha" style="display: inline-block">'
                                +'<img src="/captcha?uid=57ee0ed968422" class="captcha" onclick="captchaFresh()">'
                                +'<span class="normaltips"></span>'
                                +'</div>';
                                $('#loginForm .others').after(html);
                            }
                            captchaFresh();
                        }
                        if(!r) {
                            _alert('Login failed');
                        } else {
                            _alert(r);
                        }
                    }
                    flag = true;
                })
            }
        }
    } 
    $('#loginForm').validate({
        rules:{
            email:{
                required:true,
                minlength:4,
            },
            password: {
                required:true,
                minlength:6,
            },
            captcha:{
            	required:true,
                remote:'/captchacheck',
            }
        },
        messages:{
            captcha:{remote: 'error captcha'}
        },
        success:function(label, element) {
            $(element).parent().children('.normaltips').removeClass('errortips').addClass('correcttips').html('');
        },
        errorPlacement:function(error, element) {
            $(element).parent().children('.normaltips').removeClass('correcttips').addClass('errortips').html('<i class="l-arrow"></i>'+error.html());
        },
        onkeyup:false,
    })
    $('#phone-submit').click(function(){
    	if($('#phoneForm').valid()) {
            if(flag) {
                flag = false;
                $.post('/login-phone', $('#phoneForm').serialize(), function(r){
                    if(r == 1) {
                        var r = $('input[name="r"]').val();
                        if(r) {
                            location.href = r;
                        } else {
                            location.href = 'http://sushi.tv';
                        }
                    } else {
                        i++;
                        if(i >= 3) {
                            if(!$('#phoneForm .dca').size()) {
                                html = '<div class="form-group dca">'
                                +'<input type="text" class="form-control captchaInput" name="captcha" style="display: inline-block">'
                                +'<img src="/captcha?uid=57ee0ed968465" class="captcha" onclick="captchaFresh()">'
                                +'<span class="normaltips"></span>'
                                +'</div>';
                                $('#phoneForm .others').after(html);
                            }
                            captchaFresh();
                        }
                        if(!r) {
                            _alert('Login failed');
                        } else {
                            _alert(r);
                        }
                    }
                    flag = true;
                })
            }
        }
    })
    $('#phoneForm').validate({
        rules:{
        	/* phone:{
            	required:true,
                maxlength:30,
                remote:'/phonecheck'
            }, */
            password: {
                required:true,
                minlength:6,
            },
            captcha:{
            	required:true,
                remote:'/captchacheck',
            }
        },
        messages:{
        	//phone:{remote: 'Please enter a number'},
            captcha:{remote: 'error captcha'}
        },
        success:function(label, element) {
            $(element).parent().children('.normaltips').removeClass('errortips').addClass('correcttips').html('');
            $(element).parents('.num-col').first().children('.normaltips').removeClass('errortips').addClass('correcttips').html('');
        },
        errorPlacement:function(error, element) {
            $(element).parent().children('.normaltips').removeClass('correcttips').addClass('errortips').html('<i class="l-arrow"></i>'+error.html());
            $(element).parents('.num-col').first().children('.normaltips').removeClass('correcttips').addClass('errortips').html('<i class="l-arrow"></i>'+error.html());
        },
        onkeyup:false,
    })
    $('#phone').blur(function(){
        var phone = $(this).val();
        $.post('/phone-exist', {phone: phone,action:'login'}, function(r){
            if(r.length > 1) {
                //_alert(r);
            	$("#userphone").removeClass('correcttips').addClass('errortips').html('<i class="l-arrow"></i>'+r);
                return false;
            }else{
            	$("#userphone").removeClass('errortips').addClass('correcttips').html('');
            }
        })
    })
    
</script></div>
<script>
    $.ajaxSetup({
        beforeSend: function(jqXHR, settings){
            if(settings.type == 'POST') {
                settings.data = settings.data+'&_csrf='+$('meta[name="csrf-token"]').attr("content");
                return true;
            }
        }
    })
</script>
<script src="//s.sushi.tv/media/js/alertify.js?v=20160928094441"></script>
<script src="//s.sushi.tv/media/js/main.js?v=20160928094441"></script>
<script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-80020009-1', 'auto');
    ga('send', 'pageview');

</script>
</body>
</html>